<h1>Listing Items</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Edit?</th>
    <th>Destroy?</th>
  </tr>

<% for item in @items %>
  <tr>
    <td><%= link_to item.name, item %></td>
    <td><%= link_to 'Edit', edit_item_path(item) %></td>
    <td><%= link_to 'Destroy', item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New item', new_item_path %>
